<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>百度语音测试</title>
		<script type="text/javascript"> 
		function dotts2(){
			var value = document.getElementById('t2').value;
			var utterance = new SpeechSynthesisUtterance(value);
			window.speechSynthesis.speak(utterance);
		}
		</script>
	</head>
	<body>
		<div>
			<textarea id="t2"></textarea>
			<input type="button" id="tts2" onclick="dotts2()" value="播放">
		</div>
		<div id="bdtts_div_id">
			<audio id="tts_autio_id" autoplay="autoplay">
				<source id="tts_source_id" src="http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=9&text=我是测试的播报内容，你好" type="audio/mpeg">
				<embed id="tts_embed_id" height="0" width="0" src="">
			</audio>
		</div>
	</body>
</html>